import java.util.Random;//导入Random包

public class Main {
    public static void main(String[] args) {
        //调用Random
        Random r = new Random();
        //存放生成的验证码
        String str = "";
        //生成前四位随机字母
        for (int i = 0; i < 4; i++) {
            //随机生成52位数字，对应字母a-z和A-Z
            int rand = r.nextInt(53);
            //生成a~z
            if (rand < 26) {
                //添加随机字母
                str = str + (char)(97 + rand);
                //生成A~Z
            }else if (rand >26 ||rand < 53) {
                str = str + (char)((65 + rand) - 26);
            }
        }
        //生成0~9的随机数字
        int randInt = r.nextInt(10);
        str += randInt;
        System.out.println(str);
    }
}